package com.ruoyi.dynamic.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dynamic.mapper.UserPartyEnrollMapper;
import com.ruoyi.dynamic.domain.UserPartyEnroll;
import com.ruoyi.dynamic.service.IUserPartyEnrollService;

/**
 * 约玩报名Service业务层处理
 * 
 * @author DEREK
 * @date 2023-12-07
 */
@Service
public class UserPartyEnrollServiceImpl extends ServiceImpl<UserPartyEnrollMapper, UserPartyEnroll> implements IUserPartyEnrollService 
{
    @Autowired
    private UserPartyEnrollMapper userPartyEnrollMapper;

    /**
     * 查询约玩报名
     * 
     * @param id 约玩报名主键
     * @return 约玩报名
     */
    @Override
    public UserPartyEnroll selectUserPartyEnrollById(Long id)
    {
        return userPartyEnrollMapper.selectUserPartyEnrollById(id);
    }

    /**
     * 查询约玩报名列表
     * 
     * @param userPartyEnroll 约玩报名
     * @return 约玩报名
     */
    @Override
    public List<UserPartyEnroll> selectUserPartyEnrollList(UserPartyEnroll userPartyEnroll)
    {
        return userPartyEnrollMapper.selectUserPartyEnrollList(userPartyEnroll);
    }

    /**
     * 新增约玩报名
     * 
     * @param userPartyEnroll 约玩报名
     * @return 结果
     */
    @Override
    public int insertUserPartyEnroll(UserPartyEnroll userPartyEnroll)
    {
        userPartyEnroll.setCreateTime(DateUtils.getNowDate());
        return userPartyEnrollMapper.insertUserPartyEnroll(userPartyEnroll);
    }

    /**
     * 修改约玩报名
     * 
     * @param userPartyEnroll 约玩报名
     * @return 结果
     */
    @Override
    public int updateUserPartyEnroll(UserPartyEnroll userPartyEnroll)
    {
        userPartyEnroll.setUpdateTime(DateUtils.getNowDate());
        return userPartyEnrollMapper.updateUserPartyEnroll(userPartyEnroll);
    }

    /**
     * 批量删除约玩报名
     * 
     * @param ids 需要删除的约玩报名主键
     * @return 结果
     */
    @Override
    public int deleteUserPartyEnrollByIds(Long[] ids)
    {
        return userPartyEnrollMapper.deleteUserPartyEnrollByIds(ids);
    }

    /**
     * 删除约玩报名信息
     * 
     * @param id 约玩报名主键
     * @return 结果
     */
    @Override
    public int deleteUserPartyEnrollById(Long id)
    {
        return userPartyEnrollMapper.deleteUserPartyEnrollById(id);
    }
}
